Optimal. Leaf size=94 \[ \frac{a}{e \left (\frac{e}{x}+f\right )}-\frac{b d \cos \left (c-\frac{d f}{e}\right ) \text{CosIntegral}\left (d \left (\frac{f}{e}+\frac{1}{x}\right )\right )}{e^2}+\frac{b d \sin \left (c-\frac{d f}{e}\right ) \text{Si}\left (d \left (\frac{f}{e}+\frac{1}{x}\right )\right )}{e^2}+\frac{b \sin \left (c+\frac{d}{x}\right )}{e \left (\frac{e}{x}+f\right )} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.221876, antiderivative size = 94, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 6, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.3, Rules used = {3431, 3317, 3297, 3303, 3299, 3302} \[ \frac{a}{e \left (\frac{e}{x}+f\right )}-\frac{b d \cos \left (c-\frac{d f}{e}\right ) \text{CosIntegral}\left (d \left (\frac{f}{e}+\frac{1}{x}\right )\right )}{e^2}+\frac{b d \sin \left (c-\frac{d f}{e}\right ) \text{Si}\left (d \left (\frac{f}{e}+\frac{1}{x}\right )\right )}{e^2}+\frac{b \sin \left (c+\frac{d}{x}\right )}{e \left (\frac{e}{x}+f\right )} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3431
Rule 3317
Rule 3297
Rule 3303
Rule 3299
Rule 3302
Rubi steps
\begin{align*} \int \frac{a+b \sin \left (c+\frac{d}{x}\right )}{(e+f x)^2} \, dx &=-\operatorname{Subst}\left (\int \frac{a+b \sin (c+d x)}{(f+e x)^2} \, dx,x,\frac{1}{x}\right )\\ &=-\operatorname{Subst}\left (\int \left (\frac{a}{(f+e x)^2}+\frac{b \sin (c+d x)}{(f+e x)^2}\right ) \, dx,x,\frac{1}{x}\right )\\ &=\frac{a}{e \left (f+\frac{e}{x}\right )}-b \operatorname{Subst}\left (\int \frac{\sin (c+d x)}{(f+e x)^2} \, dx,x,\frac{1}{x}\right )\\ &=\frac{a}{e \left (f+\frac{e}{x}\right )}+\frac{b \sin \left (c+\frac{d}{x}\right )}{e \left (f+\frac{e}{x}\right )}-\frac{(b d) \operatorname{Subst}\left (\int \frac{\cos (c+d x)}{f+e x} \, dx,x,\frac{1}{x}\right )}{e}\\ &=\frac{a}{e \left (f+\frac{e}{x}\right )}+\frac{b \sin \left (c+\frac{d}{x}\right )}{e \left (f+\frac{e}{x}\right )}-\frac{\left (b d \cos \left (c-\frac{d f}{e}\right )\right ) \operatorname{Subst}\left (\int \frac{\cos \left (\frac{d f}{e}+d x\right )}{f+e x} \, dx,x,\frac{1}{x}\right )}{e}+\frac{\left (b d \sin \left (c-\frac{d f}{e}\right )\right ) \operatorname{Subst}\left (\int \frac{\sin \left (\frac{d f}{e}+d x\right )}{f+e x} \, dx,x,\frac{1}{x}\right )}{e}\\ &=\frac{a}{e \left (f+\frac{e}{x}\right )}-\frac{b d \cos \left (c-\frac{d f}{e}\right ) \text{Ci}\left (\frac{d \left (f+\frac{e}{x}\right )}{e}\right )}{e^2}+\frac{b \sin \left (c+\frac{d}{x}\right )}{e \left (f+\frac{e}{x}\right )}+\frac{b d \sin \left (c-\frac{d f}{e}\right ) \text{Si}\left (\frac{d \left (f+\frac{e}{x}\right )}{e}\right )}{e^2}\\ \end{align*}
Mathematica [A] time = 0.740666, size = 85, normalized size = 0.9 \[ \frac{\frac{e \left (b f x \sin \left (c+\frac{d}{x}\right )-a e\right )}{f (e+f x)}-b d \cos \left (c-\frac{d f}{e}\right ) \text{CosIntegral}\left (d \left (\frac{f}{e}+\frac{1}{x}\right )\right )+b d \sin \left (c-\frac{d f}{e}\right ) \text{Si}\left (d \left (\frac{f}{e}+\frac{1}{x}\right )\right )}{e^2} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.019, size = 144, normalized size = 1.5 \begin{align*} -d \left ( -{\frac{a}{e} \left ( e \left ( c+{\frac{d}{x}} \right ) -ce+df \right ) ^{-1}}+b \left ( -{\frac{1}{e}\sin \left ( c+{\frac{d}{x}} \right ) \left ( e \left ( c+{\frac{d}{x}} \right ) -ce+df \right ) ^{-1}}+{\frac{1}{e} \left ({\frac{1}{e}{\it Si} \left ({\frac{d}{x}}+c+{\frac{-ce+df}{e}} \right ) \sin \left ({\frac{-ce+df}{e}} \right ) }+{\frac{1}{e}{\it Ci} \left ({\frac{d}{x}}+c+{\frac{-ce+df}{e}} \right ) \cos \left ({\frac{-ce+df}{e}} \right ) } \right ) } \right ) \right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} b{\left (\int \frac{\sin \left (\frac{c x + d}{x}\right )}{2 \,{\left (f^{2} x^{2} + 2 \, e f x + e^{2}\right )}}\,{d x} + \int \frac{\sin \left (\frac{c x + d}{x}\right )}{2 \,{\left ({\left (f^{2} x^{2} + 2 \, e f x + e^{2}\right )} \cos \left (\frac{c x + d}{x}\right )^{2} +{\left (f^{2} x^{2} + 2 \, e f x + e^{2}\right )} \sin \left (\frac{c x + d}{x}\right )^{2}\right )}}\,{d x}\right )} - \frac{a}{f^{2} x + e f} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.33398, size = 382, normalized size = 4.06 \begin{align*} \frac{2 \, b e f x \sin \left (\frac{c x + d}{x}\right ) - 2 \, a e^{2} - 2 \,{\left (b d f^{2} x + b d e f\right )} \sin \left (-\frac{c e - d f}{e}\right ) \operatorname{Si}\left (\frac{d f x + d e}{e x}\right ) -{\left ({\left (b d f^{2} x + b d e f\right )} \operatorname{Ci}\left (\frac{d f x + d e}{e x}\right ) +{\left (b d f^{2} x + b d e f\right )} \operatorname{Ci}\left (-\frac{d f x + d e}{e x}\right )\right )} \cos \left (-\frac{c e - d f}{e}\right )}{2 \,{\left (e^{2} f^{2} x + e^{3} f\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{b \sin \left (c + \frac{d}{x}\right ) + a}{{\left (f x + e\right )}^{2}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]